Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CursedObjectConstructor #203

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

CursedObjectConstructor #203

wants to merge 3 commits into from

Conversation

aliemjay
Copy link
Contributor

No description provided.

@aliemjay aliemjay marked this pull request as draft April 30, 2022 12:35
@aliemjay
Copy link
Contributor Author

I'll look into web failure later


assert_eq!(res.status().as_u16(), 200);
assert_eq!(res.headers().get(CONTENT_TYPE).unwrap(), TEXT_UTF8);

let mut req = Request::default();
*req.uri_mut() = Uri::from_static("/abc");

let res = service.call(req).await.unwrap();
let res = Service::<Request<_>>::call(&service, req).await.unwrap();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that type inference have a hard time with such highly generic code. Though i wouldn't mind some turbofish api to guide inference for Req like with GenericRouter::with_custom_object.

But why it doesn't require annotations in Context tests. Needs more investigation and experimenting with other possible variations.

@aliemjay
Copy link
Contributor Author

aliemjay commented May 1, 2022

Wow. The breakage of the examples looks like a deal breaker. 😞

@fakeshadow
Copy link
Collaborator

with router that hide the lifetimes behind reference counting string type the need of Request<'_> is absent for now.

But zero copy deserialize types like Query<'_> and Json<'_> is still the highest thought after feature based on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants